<div class="container-flucategory_id">
    <?php
    $schs = $viewModel->get('scheduleUpdate');
    $clss = $viewModel->get('classUpdate');
    $sbjs = $viewModel->get('subjectUpdate');
    $lsss = $viewModel->get('lessionUpdate');

    include 'views/Include/alert.php';
    ?>
    <h1>Create form</h1>
    <form class="form-horizontal" method="POST">
        <div class="control-group" style="display: none">
            <label class="control-label" for="inputScheduleID">Schedule ID: </label>
            <div class="controls">
                <input type="text" id="inputScheduleID" name="schedule_id" value="<?php echo $schs[0]->schedule_id; ?>" />
            </div>
        </div> 
        <div class="control-group">
            <label class="control-label" for="inputSubjectID">Class: </label>
            <div class="controls">
                <select name="classes_id" disabled="on">
                    <?php
                    foreach ($clss as $cls) {
                        $slt = ($cls->classname == $schs[0]->classname) ? "selected='selected'" : "";
                        echo "<option value='" . $cls->classes_id . "' " . $slt . ">" . $cls->classname . "</option>";
                    }
                    ?>

                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputSubjectID">Subject: </label>
            <div class="controls">
                <select name="subject_id" disabled="on">
                    <?php
                    foreach ($sbjs as $sbj) {
                        $slt = ($sbj->subject_name == $schs[0]->subject_name) ? "selected='selected'" : "";
                        echo "<option value='" . $sbj->subject_id . "'" . $slt . ">" . $sbj->subject_name . "</option>";
                    }
                    ?>

                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputSubjectID">Lession: </label>
            <div class="controls">
                <select name="lession_id">
                    <?php
                    foreach ($lsss as $lss) {
                        $slt = ($lss->lession_name == $schs[0]->lession_name) ? "selected='selected'" : "";
                        echo "<option value='" . $lss->lession_id . "'" . $slt . ">" . $lss->lession_name . "</option>";
                    }
                    ?>

                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputSubjectID">Date: </label>
            <div class="controls">
                <input type="text" id="iptDate"  class="iptDate"  name="dates" value="<?php echo Helper::reConvertDate($schs[0]->dates) ?>" />
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn btn-success">Submit</button>
                <button type="reset" class="btn">Reset</button>
            </div>
        </div>
    </form>
</div>
